<template>
  <tl-sub-page :render="render" :visible.sync="visible" v-dialogDrag :title="moduleTitle" :close-on-click-modal="false" class="tl-dialog" width="1200px" @open="open" @close="close">
    <el-form class="tl-form" ref="form" :model="model" :rules="rules" label-width="150px">
			<el-row>
				<el-col :span="12">
					<el-form-item label="区域授权人员" prop="areaauthorizationusercode" :rules="rules.validateRequire">
						<tl-ref-user v-model="model.areaauthorizationusercode" :initDisplayData.sync="model.areaauthorizationusername" dataType="code" :singleSelect="false"></tl-ref-user>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="排序码" prop="sortcode">
						<el-input-number v-model="model.sortcode" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
					</el-form-item>
				</el-col>
			</el-row>
		</el-form>
		<el-form class="tl-form" ref="form" :model="model" :rules="rules" label-width="150px" disabled>
			<el-row>
        <el-col :span="24">
          <el-divider content-position="center"><span>【以下信息为只读信息】</span></el-divider>
        </el-col>
      </el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="一级部门" prop="deptcommoncode">
						<el-select v-model="model.deptcommoncode">
							<el-option v-for="item in codeModel.deptcommoncodeList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="区域名称" prop="name">
						<el-input v-model="model.name"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="区域级别" prop="arealevel">
						<el-select v-model="model.arealevel">
							<el-option v-for="item in codeModel.arealevelList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="单位类型" prop="areatype">
						<el-select v-model="model.areatype">
							<el-option v-for="item in codeModel.areatypeList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="上级区域" prop="parentname">
						<el-input v-model="model.parentname" disabled></el-input>
					</el-form-item>
				</el-col>
          <el-col :span="12">
          <el-form-item label="生效日期" prop="sortcode" >
            <el-date-picker v-model="model.pmsenableddate" type="month" placeholder="选择生效月份"> </el-date-picker>
          </el-form-item>
        </el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="备注" prop="description" >
						<el-input v-model="model.description" type="textarea" :rows="3"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="doSubmitEdit" :loading="saveLoading">确认</el-button>
    </div>
  </tl-sub-page>
</template>

<script>
/** mixins */
import { mixin_approval_edit } from '@tapui/mixins/mixin_approval_edit'
/** 子组件 */
import tlRefAreaGroup from './refAreaGroup'
/** 工具类 */
import { putAction, getAction, postAction, deleteAction } from '@tapui/utils/http'
/** VUE配置 */
export default {
  mixins: [mixin_approval_edit],
  components: { tlRefAreaGroup },
  data() {
    return {
      moduleTitle: '变更页面',
      urlPrefix: '/mms/provinceCityMatchinfo/',
      url: {
        // 额外的url
				queryDataUrl: '/mms/provinceCityMatchinfo/list',
				queryTreeUrl: '/mms/provinceCityMatchinfo/queryParentTreeList',
				queryDeptcommoncode: '/mms/provinceCityMatchinfo/queryDeptcommoncode'
      }
    }
  },
  methods: {

  }
}
</script>

